package com.dfbz.demo01_缓存字节流;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo03_转换输出流 {
    public static void main(String[] args) throws Exception{

        // 创建一个转换输出流
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("C:\\Users\\Administrator\\Desktop\\003.txt"),"GBK");

        osw.write("你好");
        osw.write("我好");
        osw.write("大家好");

        osw.close();
    }
}
